home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / text0193.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.1 KB  |  41 lines

  1. >>What I want to do is use AmosPro to create a file in Ram called Datapath
  2. >>and then execute it with Amiga dos.
  3. >>If you look at the example below it should create a file called Datapath
  4. >>containing "CD workbench:data".
  5. >>
  6. >>a$="workbench:data"
  7. >>C$="CD "
  8. >>A$=C$+A$
  9. >>Open Out 3,"Ram:Datapath"
  10. >>Print #3,A$
  11. >>Print #3,Chr$(13)
  12. >>Close 3
  13. >
  14. >If you write your info to a bank and Bsave from it you eliminate the
  15. >extra characters.  But in this case, how about quick & dirty with the
  16. >CLI echo command?
  17. >
  18. >A$="CD workbench:data"
  19. >exec "echo "+A$+" >ram:Datapath"  :Rem Keep those spaces
  20.  
  21. This echo thing will only work once, replacing the file each time.  To
  22. enter further commands put '>>' (append file) instead of '>' (replace file)
  23.  
  24. Better is the Amos way:
  25.  
  26. Open Out 3,"Ram:Datapath"
  27. Print #3,A$;Chr$(10);
  28. Close 3
  29.  
  30. Exec "execute ram:Datapath"
  31.  
  32. Curt
  33.  
  34. ============================================================================
  35. Curtis Yallop       "Ms-Dos Sucks Dirt"      cyallop@gpu.srv.ualberta.ca
  36. Amiga 1200 - '030 28MHz, 6MB RAM, 540HD      http://www.ualberta.ca/~cyallop
  37. ============================================================================
  38.  
  39.  
  40.  
  41.